<?php
namespace app\index\controller;
use think\Controller;
use think\Db;

class Base extends Controller{

    public function _initialize(){
        $this -> nav();
    }

    public function nav(){
        $navers = Db::name('cate') -> order('id ASC') -> select();
        $links = Db::name('link') -> order('id DESC') -> select();


        $this -> assign('navers', $navers);
        $this -> assign('links', $links);

    }
}